package com.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dao.ExamEnrollmentDao;
import com.dao.KechengxinxiDao;
import com.entity.ExamEnrollmentEntity;
import com.entity.KechengxinxiEntity;
import com.entity.view.ExamEnrollmentView;
import com.entity.view.KechengxinxiView;
import com.entity.vo.ExamEnrollmentVO;
import com.entity.vo.KechengxinxiVO;
import com.service.ExamEnrollmentService;
import com.service.KechengxinxiService;
import com.utils.PageUtils;
import com.utils.Query;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("examEnrollmentService")
public class ExamEnrollmentServiceImpl extends ServiceImpl<ExamEnrollmentDao, ExamEnrollmentEntity> implements ExamEnrollmentService {
	
	
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ExamEnrollmentEntity> page = this.selectPage(
                new Query<ExamEnrollmentEntity>(params).getPage(),
                new EntityWrapper<ExamEnrollmentEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
	public PageUtils queryPage(Map<String, Object> params, Wrapper<ExamEnrollmentEntity> wrapper) {
		  Page<ExamEnrollmentView> page =new Query<ExamEnrollmentView>(params).getPage();
	        page.setRecords(baseMapper.selectListView(page,wrapper));
	    	PageUtils pageUtil = new PageUtils(page);
	    	return pageUtil;
 	}
    
    @Override
	public List<ExamEnrollmentVO> selectListVO(Wrapper<ExamEnrollmentEntity> wrapper) {
 		return baseMapper.selectListVO(wrapper);
	}
	
	@Override
	public ExamEnrollmentVO selectVO(Wrapper<ExamEnrollmentEntity> wrapper) {
 		return baseMapper.selectVO(wrapper);
	}
	
	@Override
	public List<ExamEnrollmentView> selectListView(Wrapper<ExamEnrollmentEntity> wrapper) {
		return baseMapper.selectListView(wrapper);
	}

	@Override
	public ExamEnrollmentView selectView(Wrapper<ExamEnrollmentEntity> wrapper) {
		return baseMapper.selectView(wrapper);
	}


}
